import { ECOption } from "@/components/ECharts/config"
interface DateValueType {
  [key: string]: { timeType: number }
}
// 日期区间
export const dateOption = [
  { label: "小时", value: "hour" },
  { label: "日", value: "day" },
  { label: "月", value: "month" }
]
export const dateValue: DateValueType = {
  hour: { timeType: 4 },
  day: { timeType: 3 },
  month: { timeType: 2 }
}
const demoOption: ECOption = {
  grid: {
    top: "10%",
    right: "1%",
    bottom: "5%",
    left: "10%"
  },
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "shadow"
    }
  },
  xAxis: {
    type: "category",
    data: []
  },
  yAxis: {
    type: "value",
    splitLine: { lineStyle: { type: "dashed" } }
  },
  series: [
    {
      data: [],
      type: "bar",
      barWidth: 18,
      itemStyle: {
        borderRadius: [20, 20, 0, 0]
      }
    }
  ]
}
export const option1: ECOption = {
  ...demoOption,
  series: [
    {
      data: [],
      type: "line",
      smooth: true
    }
  ]
}
export const option2: ECOption = {
  ...demoOption
}
